package xcmg.device.dao.mapper.sale;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.sale.SaleReverseDetailDO;
import xcmg.device.service.vo.sale.SaleReverseDetailVO;

import java.util.List;

@Mapper
public interface SaleReverseDetailMapper {
    int deleteByPrimaryKey(String id);

    int insert(SaleReverseDetailDO record);

    SaleReverseDetailDO selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SaleReverseDetailDO record);

    List<SaleReverseDetailDO> list(SaleReverseDetailVO vo);

    int removeByInOrderList(@Param("orderList") List<String> orderList, @Param("orgId") String orgId);

    List<SaleReverseDetailDO> findByReverseOrder(@Param("orderList") List<String> orderList);

    List<SaleReverseDetailDO> findByReverseOrderForLocationUser(@Param("orderList") List<String> orderList);

    List<SaleReverseDetailDO> findByReverseOrderAndOrgId(@Param("reverseOrder") String reverseOrder, @Param("orgId") String orgId);

    int updateStateByOrder(@Param("reverseOrder") String reverseOrder, @Param("state") Integer state, @Param("orgId") String orgId);
}